package com.xy.controller;

import com.xy.entity.Role;
import com.xy.repository.RoleRepository;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
public class RoleController {
    @Autowired
    private RoleRepository roleMapRepository;
    @RequestMapping("/get")
    public List<Role> get(){
        System.out.println(roleMapRepository.findAll());

        return (List<Role>) roleMapRepository.findAll();
    }

}